class Solution {
public:
    int minNumberDisappeared(vector<int>& nums)
    {
        int n = nums.size();
        unordered_map<int, int> mp;
        for (int i = 0; i < n; i++)
        {
            mp[nums[i]]++;
        }
        int res = 1;
        while (mp.find(res) != mp.end())
        {
            res++;
        }
        return res;
    }
};
